<template>
  <div class="main-container">
    <el-form :model="query" inline label-width="80px">
      <el-form-item>
        <el-input v-model="query.orderNo" placeholder="根据订单号搜索" prefix-icon="Search" />
      </el-form-item>
      <el-form-item>
        <el-input v-model="query.mobile" placeholder="根据手机号码搜索" prefix-icon="Search" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="handleQuery()">查询</el-button>
        <el-button @click="resetQuery()">重置</el-button>
      </el-form-item>
    </el-form>
    <common-order :page="page" :goods-visible="false" @handle-page="handlePage" />
  </div>
</template>
<script setup>
  import useTable from '@/utils/table'
  import { commonApi } from '@/api/common'
  import { useRoute } from 'vue-router'
  import CommonOrder from '@/components/Common/Order/index.vue'
  const route = useRoute()

  // 基础功能
  const { page, handlePage, query, handleQuery, resetQuery } = useTable(
    {
      page: commonApi.orderPage()
    },
    { courseId: route.query.courseId }
  )
</script>
